home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 December / PCWorld_2007-12_cd.bin / v cisle / steadystate / SteadyState_Setup_ENU.exe / sctnortonvirusupdate.vbs < prev    next >
Encoding:
Text File  |  2006-10-25  |  1.7 KB  |  55 lines

  1. ∩╗┐' ***  
  2. ' *** ------------------------------------------------------------------------------
  3. ' *** Filename:        SCTNortonVirusUpdate.vbs
  4. ' *** ------------------------------------------------------------------------------
  5. ' *** Description:    Norton Virus Signature Update
  6. ' *** ------------------------------------------------------------------------------
  7. ' *** Version:        1.0
  8. ' *** Notes:        Used by Windows Disk Protection
  9. ' *** ------------------------------------------------------------------------------
  10. ' *** Copyright (C) Microsoft Corporation 2005, All Rights Reserved
  11. ' *** ------------------------------------------------------------------------------
  12. ' *** 
  13.  
  14. ' ~~~ 
  15. ' ~~~ Force variables to be declared 
  16. ' ~~~ 
  17. Option Explicit
  18.  
  19. ' ~~~ 
  20. ' ~~~ Turn on error handling
  21. ' ~~~ 
  22. On Error Resume Next
  23.  
  24. ' ~~~ 
  25. ' ~~~ Declare global variables
  26. ' ~~~ 
  27. Dim sNortonPath, oShell, strComputer, oWMIService, ColProcesses
  28.  
  29. ' ~~~ Create objects
  30. Set oShell = CreateObject("WScript.Shell")
  31.  
  32. ' ~~~ Set application path
  33. sNortonPath = oshell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\LUALL.EXE\")
  34.  
  35. '~~~ Download Virus Signature
  36. call oShell.Run("""" & sNortonPath & """" & " -s", 0, True)
  37.  
  38. Do
  39. strComputer = "."
  40. Set oWMIService = GetObject("winmgmts:" _
  41.     & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
  42. Set colProcesses = oWMIService.ExecQuery _
  43.     ("Select * from Win32_Process Where Name = 'LUCOMS~1.EXE'")
  44.  
  45. Loop Until colProcesses.Count = 0
  46.  
  47. Set colProcesses = oWMIService.ExecQuery _
  48.     ("Select * from Win32_Process Where Name = 'LUUPDATE.EXE'")
  49.  
  50. If colProcesses.Count = 0 Then
  51.     Wscript.Sleep(1000)
  52. Else
  53.     Wscript.Sleep(600000)
  54. End If
  55.